<?php
//kill -9 干掉进程
$fileName = '../runtime/hyperf.pid';
try {
    $handle = fopen($fileName, 'r');
    if($handle){
        $pid = fgets($handle);
        exec('kill -9 ' . $pid);
    }
} catch (\Exception $e) {
    var_dump($e->getMessage());
}